package com.qc31.baselib.net.errorhandler

import io.reactivex.rxjava3.core.Single
import io.reactivex.rxjava3.functions.Function

/**
 * 错误处理
 */
class SingleHttpErrorHandler<T> : Function<Throwable, Single<T>> {

    override fun apply(t: Throwable): Single<T> {
        return Single.error(ExceptionHandle.handlerException(t))
    }
}